Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inverter-mqtt/mqtt-push.sh: optimize #69

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dilyanpalauzov
Copy link
Contributor

On Raspberry Pi 3B executing the original code, with Influx disabled, takes:

real    0m57,753s
user    0m54,679s
sys     0m2,214s

With the modification the time is:

real    0m10,733s
user    0m8,338s
sys     0m0,759s

For the record, I run the code outside of containers.

On Raspberry Pi 3B executing the original code, with Influx disabled, takes:
real    0m57,753s
user    0m54,679s
sys     0m2,214s

With the modification the time is:
real    0m10,733s
user    0m8,338s
sys     0m0,759s

For the record, I run the code outside of containers.
Here more jq-calls are replaced with sed.  The time on Raspberry Pi is now

real    0m4,965s
user    0m2,595s
sys     0m0,726s

I do not use Influx.  This allows updating the data in OpenHab (I read
the MQTT stream from OpenHAB) every five seconds, once all jq calls are
removed.
@dilyanpalauzov
Copy link
Contributor Author

The second commit eliminates some more jq calls and reduces the execution time from 10s to 5s on Raspberry Pi 3B.

@dilyanpalauzov dilyanpalauzov mentioned this pull request Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant